package com.zijie.rbac.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zijie.rbac.model.Perm;
import com.zijie.rbac.model.Role;

import java.util.List;

public interface RoleService {
    Page<Role> findAll(Role role, Page<Role> page);

    Role findById(Integer id);

    boolean save(Role role);

    boolean update(Role role);

    int deleteByIds(List<Integer> ids);

    boolean assignAdminToGroup(Long adminId, Long userGroupId);

    boolean assignPermToRole(Long roleId, Long permId);

    List<Perm> findPermsByRoleId(Long roleId);

    boolean removeRolePermission(Long roleId, Long permissionId);
}
